
/**上传 **/
export const fileUpload = async({ name, filePath }): Promise<any> => {
    return new Promise((resolve, reject) => {
        uni.uploadFile({
            url:  import.meta.env.VITE_BASE_URL + '/api/upload/image',
            name,
            filePath,
            success(result) {
                // console.log('result===', result)
                resolve( JSON.parse(result.data) )

            },
            fail(err) {
                reject(err)
            },
        })
    })

}

